#include <time.h>

#include <mms.h>

int main(int argc, char *argv[]) {

	mmsInit(MMSINIT_WINDOWMANAGER, argc, argv,"./config/diskorc.xml");

	MMSDialogManager welcomeDialog;
	MMSWindow *welcomeWindow = welcomeDialog.loadDialog ("./config/welcome.xml");
	welcomeWindow->show();
	MMSDialogManager backgroundDialog;
	MMSWindow *backgroundWindow = backgroundDialog.loadDialog ("./config/background.xml");
	backgroundWindow->show();
	sleep (5);
	welcomeWindow->hide();

	sleep (1);
	MMSDialogManager menuDialog;
	MMSWindow *menuWindow = menuDialog.loadDialog ("./config/menu.xml");
	menuWindow->show();

	MMSDialogManager clockDialog;
	MMSWindow *clockWindow = clockDialog.loadDialog ("./config/clock.xml");
	clockWindow->show();
	MMSLabel *clockLabel = (MMSLabel *)clockDialog["label1"];
	time_t rawtime;
	struct tm *timeinfo;
	while (1) {
	time (&rawtime);
	        timeinfo = localtime (&rawtime);
		        clockLabel->setText(asctime(timeinfo));
			        sleep (2);
				}
	sleep (10);
	return 0;
}

